home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNSVRR.IN_ / oemnsvrr.inf
INI File  |  1996-07-12  |  30KB  |  733 lines

  1. [Identification]
  2.     OptionType = NetService
  3. [Options]
  4.     NWLNKRIP
  5. [FileConstants]
  6. Manufacturer    = "Microsoft"
  7. ProductMajorVersion     = "4"
  8. ProductMinorVersion     = "0"
  9. SoftwareType = "service"
  10. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  11. ProductOpSupport     = 134 
  12. ProductNWLNKRIPName  = "NwlnkRip"
  13. ProductNWLNKRIPImagePath  = "%SystemRoot%\system32\drivers\nwlnkrip.sys"
  14. ProductSAPName          = "SAP"
  15. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\NwlnkRip\CurrentVersion"
  16. ProductSAPKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\NwSapAgent"
  17. [GeneralConstants]
  18. UtilityInf       = "UTILITY.INF"
  19. subroutineinf    = "SUBROUTN.INF"
  20. Exit_Code        = 0
  21. BillboardVisible = 0
  22. from      = ""
  23. to        = ""
  24. ExitCodeOk     = 0
  25. ExitCodeCancel = 1
  26. ExitCodeFatal  = 2
  27. KeyNull         = ""
  28. MAXIMUM_ALLOWED   = 33554432
  29. SERVICE_NO_CHANGE = 4294967295
  30. RegistryErrorIndex = NO_ERROR
  31. KeyProduct      = ""
  32. KeyParameters   = ""
  33. TRUE            = 1
  34. FALSE           = 0
  35. NoTitle         = 0
  36. ExitState   = "Active"
  37. OldVersionExisted = $(FALSE)
  38. [date]
  39.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  40. [Identify]
  41.     read-syms Identification
  42.     set Status     = STATUS_SUCCESSFUL
  43.     set Identifier = $(OptionType)
  44.     set Media      = #("Source Media Descriptions", 1, 1)
  45.     Return $(Status) $(Identifier) $(Media)
  46. [ReturnOptions]
  47.     set Status        = STATUS_FAILED
  48.     set OptionList     = {}
  49.     set OptionTextList = {}
  50.     set LanguageList = ^(LanguagesSupported, 1)
  51.     Ifcontains(i) $($0) in $(LanguageList)
  52.         goto returnoptions
  53.     else
  54.         set Status = STATUS_NOLANGUAGE
  55.         goto finish_ReturnOptions
  56.     endif
  57. returnoptions = +
  58.     ifstr(i) $(!STF_PRODUCT) != WINNT
  59.         set OptionList     = ^(Options, 1)
  60.         set OptionTextList = ^(OptionsText$($0), 1)
  61.     endif
  62.     set Status         = STATUS_SUCCESSFUL
  63. finish_ReturnOptions = +
  64.     Return $(Status) $(OptionList) $(OptionTextList)
  65. [InstallOption]
  66.     set Option   = $($1)
  67.     set SrcDir   = $($2)
  68.     set AddCopy  = $($3)
  69.     set DoCopy   = $($4)
  70.     set DoConfig = $($5)
  71.     set InstallFrom = $($6)
  72.     ifstr(i) $(InstallFrom) == ""
  73.         set InstallFrom = "NWLNKRIP"
  74.     endif
  75.     set LanguageList = ^(LanguagesSupported, 1)
  76.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  77.         Return STATUS_NOLANGUAGE
  78.     endif
  79.     set-subst LF = "\n"
  80.     read-syms GeneralConstants
  81.     read-syms FileConstants
  82.     read-syms DialogConstants$(!STF_LANGUAGE)
  83.     ifstr(i) $(!NTN_Origination) == "NCPA"
  84.         set Continue = $(OK)
  85.     endif
  86.     read-syms FileConstants$(!STF_LANGUAGE)
  87.     detect date
  88.     set-title  $(FunctionTitle)
  89.     set to   = Begin
  90.     set from = Begin
  91.     set CommonStatus = STATUS_SUCCESSFUL
  92.     EndWait
  93. Begin = +
  94.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  95.         set StartLabel = removeadapter
  96.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  97.         set StartLabel = UpgradeSoftware
  98.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  99.         set StartLabel = configureadapter
  100.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  101.         set StartLabel = bindingadapter
  102.     else
  103.         set StartLabel = installadapter
  104.         set OEM_ABANDON_SOFTWARE = {}
  105.         set OEM_ABANDON_OPTIONS = {}
  106.     endif
  107.     set from = $(fatal)
  108.     set to = $(fatal)
  109.     goto $(StartLabel)
  110. installadapter = +
  111.     set OEM_ABANDON_ON  = TRUE
  112.     StartWait
  113.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeySoftware
  114.     Ifstr(i) $(KeySoftware) == $(KeyNull)
  115.         ifstr(i) $(!NTN_InstallMode) == "install"
  116.             Ifstr(i) $(DoCopy) == "YES"
  117.                 Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  118.                 Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  119.                    Goto ShellCodeError
  120.                 Else-Ifstr(i) $($R0) == STATUS_FAILED
  121.                    Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  122.                    ifint $($ShellCode) != $(!SHELL_CODE_OK)
  123.                       goto ShellCodeError
  124.                    endif
  125.                    set Error = $($R0)
  126.                    Goto fatal
  127.                 Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  128.                    Goto successful
  129.                 Endif
  130.                 Set SrcDir = $($R1)
  131.             Endif
  132.             set NwlnkName = "NWLINKIPX"
  133.             OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWLINKIPX" $(MAXIMUM_ALLOWED) BS_KeyServices
  134.             Ifstr $(BS_KeyServices) == $(KeyNull)
  135.                 set NwlnkName = "NWLNKIPX"
  136.                 OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWLNKIPX" $(MAXIMUM_ALLOWED) BS_KeyServices
  137.                 Ifstr $(BS_KeyServices) == $(KeyNull)
  138.                     Shell "oemnxpip.inf" ReturnOptions $(!STF_LANGUAGE)
  139.                     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  140.                         set OldStfSrcDir = $(!STF_SRCDIR_OVERRIDE)
  141.                         set !STF_SRCDIR_OVERRIDE = ""
  142.                         set NwlnkName = *($($R1),1)
  143.                         Shell "oemnxpip.inf" InstallOption $(!STF_LANGUAGE), *($($R1),1),+
  144.                             $(SrcDir), $(AddCopy), "NO", $(DoConfig)
  145.                         set !STF_SRCDIR_OVERRIDE = $(OldStfSrcDir)
  146.                     else
  147.                         Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(InstallNWLINKFirst)
  148.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  149.                             goto ShellCodeError
  150.                         endif
  151.                         goto end
  152.                     endif
  153.                 else
  154.                     CloseRegKey $(BS_KeyServices)
  155.                 endif
  156.             else
  157.                 CloseRegKey $(BS_KeyServices)
  158.             endif
  159.             Debug-Output "OEMNSVRR.INF: installadapter: installing [Install-Option]"
  160.             install "Install-Option"
  161.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  162.                Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  163.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  164.                    goto ShellCodeError
  165.                endif
  166.                set Error = $($R0)
  167.                goto fatal
  168.             endif
  169.         endif
  170.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWLNKRIP" $(MAXIMUM_ALLOWED) KeyService
  171.         Ifstr(i) $(KeyService) == $(KeyNull)
  172.             Shell $(UtilityInf), AddSoftwareComponent, "Microsoft", +
  173.                 $(ProductNWLNKRIPName), +
  174.                 $(ProductNWLNKRIPName), +
  175.                 $(ProductNWLNKRIPDisplayName), +
  176.                 $(STF_CONTEXTINFNAME),+
  177.                 $(ProductNWLNKRIPImagePath), +
  178.                 "kernelautostart" , "", {"NWLNKIPX"}, ""
  179.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  180.                 Debug-Output "OEMNSVRR.INF: ShellCode error"
  181.                 return STATUS_FAILED
  182.             endif
  183.             set RegistryErrorIndex = $($R0)
  184.             set ProductKey = $($R1)
  185.             set RuleKey = $($R2)
  186.             CloseRegKey $($R3)
  187.             set ParamKey = $($R4)
  188.             CloseRegKey $($R5)
  189.             Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  190.                 EndWait
  191.                 Debug-Output "OEMNSVRR.INF: Registry Error "$(RegistryErrorIndex)
  192.                 CloseRegKey $($R1)
  193.                 CloseRegKey $($R2)
  194.                 CloseRegKey $($R4)
  195.                 goto fatalregistry
  196.             endif
  197.             set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  198.                                {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  199.                                {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductNWLNKRIPTitle)},+
  200.                                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductNWLNKRIPDescription)},+
  201.                                {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  202.                                {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}, +
  203.                                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  204.             Shell  $(UtilityInf), AddValueList, $(ProductKey), $(NewValueList)
  205.             CloseRegKey $(ProductKey)
  206.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  207.                 Debug-Output "utility.INF: ShellCode error. Cannot add NWLNKRIP router service"
  208.                 goto ShellCodeError
  209.             endif
  210.             set RegistryErrorIndex = $($R0)
  211.             Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  212.                 EndWait
  213.                 Debug-Output "OEMNSVRR.INF:  error: create service"
  214.                 set Status = STATUS_FAILED
  215.             endif
  216.             set NewValueList = {{InfOption,$(NoTitle),$(!REG_VT_SZ),"NWLNKRIP"}}
  217.             Shell  $(UtilityInf), AddValueList, $(RuleKey), $(NewValueList)
  218.             CloseRegKey $(RuleKey)
  219.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  220.                 Debug-Output "utility.INF: ShellCode error. Cannot add NWLNKRIP service"
  221.                 goto ShellCodeError
  222.             endif
  223.             set RegistryErrorIndex = $($R0)
  224.             Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  225.                 EndWait
  226.                 Debug-Output "OEMNSVRR.INF: Registry error: create service"
  227.                 set Status = STATUS_FAILED
  228.             endif
  229.             SetRegValue $(ParamKey) {NetbiosRouting, $(NoTitle), $(!REG_VT_DWORD), 0}
  230.             SetRegValue $(ParamKey) {EnableLanRouting, $(NoTitle), $(!REG_VT_DWORD), 1}
  231.             CloseRegKey $(ParamKey)
  232.         else
  233.             OpenRegKey $(KeyService) "" "Parameters\UseRef" $(MAXIMUM_ALLOWED) KeyUseRef
  234.             Ifstr(i) $(KeyUseRef) != $(KeyNull)
  235.                  SetRegValue $(KeyUseRef) {$(InstallFrom) , 0, $(!REG_VT_SZ), "1"}
  236.                  CloseRegKey $(KeyUseRef)
  237.             Endif
  238.             OpenRegKey $(KeyService) "" "Parameters" $(MAXIMUM_ALLOWED) KeyParam
  239.             Ifstr(i) $(KeyParam) != $(KeyNull)
  240.                 GetRegValue $(KeyParam),"NetbiosRouting", NetbiosRoutingInfo
  241.                 Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  242.                    SetRegValue $(KeyParam) {NetbiosRouting, $(NoTitle), $(!REG_VT_DWORD), 0}
  243.                 endif
  244.                 GetRegValue $(KeyParam),"EnableLanRouting", EnableLanRoutingInfo
  245.                 Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  246.                    SetRegValue $(ParamKey) {EnableLanRouting, $(NoTitle), $(!REG_VT_DWORD), 1}
  247.                 endif
  248.                 CloseRegKey $(KeyParam)
  249.             endif
  250.             CloseRegKey $(KeyService)
  251.             Shell $(UtilityInf), InstallSoftwareProduct, $(Manufacturer), $(ProductNWLNKRIPName), $(STF_CONTEXTINFNAME)
  252.             set RegistryErrorIndex = $($R0)
  253.             Ifstr(i) $(RegistryErrorIndex) == NO_ERROR
  254.                 set KeyVersion  = $($R1)
  255.                 set KeyRules    = $($R2)
  256.                 set NewValueList = {{MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  257.                                    {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductNWLNKRIPTitle)},+
  258.                                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductNWLNKRIPDescription)},+
  259.                                    {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  260.                                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  261.                 Shell  $(UtilityInf), AddValueList, $(KeyVersion), $(NewValueList)
  262.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  263.                     Debug-Output "utility.INF: ShellCode error. Cannot add NWLNKRIP router service"
  264.                     goto ShellCodeError
  265.                 endif
  266.                 set RegistryErrorIndex = $($R0)
  267.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  268.                     EndWait
  269.                     Debug-Output "OEMNSVRR.INF:  error: Add values to version key"
  270.                     set Status = STATUS_FAILED
  271.                 endif
  272.                 set NewValueList = {{InfOption,$(NoTitle),$(!REG_VT_SZ),"NWLNKRIP"}}
  273.                 Shell  $(UtilityInf), AddValueList, $(KeyRules), $(NewValueList)
  274.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  275.                     Debug-Output "utility.INF: ShellCode error. Cannot add NWLNKRIP netrule value"
  276.                     goto ShellCodeError
  277.                 endif
  278.                 set RegistryErrorIndex = $($R0)
  279.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  280.                     EndWait
  281.                     Debug-Output "OEMNSVRR.INF: Registry error: Add netrule"
  282.                     set Status = STATUS_FAILED
  283.                 endif
  284.                 Shell $(UtilityInf), LinkToService, $(KeyVersion), "NWLNKRIP", service
  285.                 set RegistryErrorIndex = $($R0)
  286.                 Ifstr(i) $(RegistryErrorIndex) == NO_ERROR
  287.                     GetRegValue $(KeyVersion),"RefCount", RefCountInfo
  288.                     Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  289.                         SetRegValue $(KeyVersion) {RefCount,$(NoTitle),$(!REG_VT_DWORD),0}
  290.                     endif
  291.                     Shell "" AddNWLNKRIPUsed "RAS"
  292.                 endif
  293.                 ifstr $(KeyVersion) != $(KeyNull)
  294.                     CloseRegKey $(KeyVersion)
  295.                 endif
  296.                 ifstr $(KeyRules) != $(KeyNull)
  297.                     CloseRegKey $(KeyRules)
  298.                 endif
  299.             endif
  300.         endif
  301.     Else
  302.         GetRegValue $(KeySoftware) "MajorVersion" VersionInfo
  303.         set VersionMajor = *($(VersionInfo), 4)
  304.         GetRegValue $(KeySoftware) "MinorVersion" VersionInfo
  305.         set VersionMinor = *($(VersionInfo), 4)
  306.         set InstalledVersion = $(VersionMajor)"."$(VersionMinor)
  307.         ifstr(i) $(InstallFrom) == "NWLNKRIP"
  308.             read-syms VerExists$(!STF_LANGUAGE)
  309.             set Text = $(Product$(Option)Title)$(Ver)$(ProductVersion)+
  310.                        $(Text1)
  311.             Shell $(subroutineinf), SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Text)
  312.             Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  313.                 Goto fatal
  314.             Else-Ifstr(i) $($R0) == STATUS_FAILED
  315.                 Goto fatal
  316.             Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  317.                 Goto end
  318.             Endif
  319.         else
  320.             Shell "" AddNWLNKRIPUsed $(InstallFrom)
  321.         endif
  322.         goto end
  323.     EndIf
  324.     Ifstr(i) $(KeySoftware) != $(KeyNull)
  325.         CloseRegKey $(KeySoftware)
  326.     endif
  327.     Shell "" AddNWLNKRIPUsed $(InstallFrom)
  328.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductSAPKeyName) $(MAXIMUM_ALLOWED) SAPKeyProduct
  329.     ifstr(i) $(SAPKeyProduct) == ""
  330.         set !STF_SRCDIR_OVERRIDE = $(SrcDir)
  331.         Shell "oemnsvsa.inf" InstallOption $(!STF_LANGUAGE) "SAP"  +
  332.           $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "NWLNKRIP"
  333.     endif
  334.     OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\NwLnkIpx\Parameters" $(MAXIMUM_ALLOWED) KeyIpx
  335.     IfStr(i) $(KeyIpx) != ""
  336.         GetRegValue $(KeyIpx), "RipTableSize", RipTableInfo
  337.         Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  338.            SetRegValue $(KeyIpx) {RipTableSize, $(NoTitle), $(!REG_VT_DWORD), 255}
  339.         endif
  340.         CloseRegKey $(KeyIpx)
  341.     EndIf
  342.     EndWait
  343.     goto configureadapter
  344. configureadapter = +
  345.     ifstr(i) $(!NTN_InstallMode) == configure
  346.         set CommonStatus = STATUS_NO_EFFECT
  347.     endif
  348.     Debug-Output "OEMNSVRR.INF: !STF_UNATTENDED = "$(!STF_UNATTENDED)
  349.     set Unattended = NO
  350.     ifstr(i) $(!STF_UNATTENDED) == "YES"
  351.         set Unattended = "YES"
  352.     else-ifstr(i) $(!STF_UNATTENDED) != ""
  353.         set Unattended = "YES"
  354.     else-ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  355.         set Unattended = "YES"
  356.     endif
  357.     ifstr(i) $(Unattended) == NO
  358.         set NetbiosRouting = 0
  359.         set ServiceName = $(!NTN_ServiceBase)"\NWLNKRIP\Parameters"
  360.         OpenRegKey $(!REG_H_LOCAL) "" $(ServiceName) $(MAXIMUM_ALLOWED) KeyParam
  361.         Ifstr(i) $(KeyParam) != $(KeyNull)
  362.             GetRegValue $(KeyParam),"NetbiosRouting", NetbiosRoutingInfo
  363.             Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  364.                set NetbiosRouting = *($(NetbiosRoutingInfo), 4)
  365.             else
  366.                SetRegValue $(KeyParam) {NetbiosRouting, $(NoTitle), $(!REG_VT_DWORD), 0}
  367.             endif
  368.         else
  369.             read-syms ConfigErrorTxt$(!STF_LANGUAGE)
  370.             shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) WARNING $(Error)
  371.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  372.                 goto ShellCodeError
  373.             endif
  374.             goto end
  375.         endif
  376.         read-syms EnableNetbiosRoutingDlg$(!STF_LANGUAGE)
  377.         ifint $(NetbiosRouting) == 0
  378.             set STF_MB_TEXT = $(Disabled)
  379.         else-ifint $(NetbiosRouting) == 2
  380.             set STF_MB_TEXT = $(Disabled)
  381.         else
  382.             set STF_MB_TEXT = $(Enabled)
  383.         endif
  384.         ui start "EnableNetbiosDlg"
  385.         ifstr(i) $(DLGEVENT) == "YES"
  386.             ifint $(NetbiosRouting) == 0
  387.                set NetbiosRouting = 1
  388.             else-ifint $(NetbiosRouting) == 1
  389.                set NetbiosRouting = 0
  390.             else-ifint $(NetbiosRouting) == 2
  391.                set NetbiosRouting = 3
  392.             else-ifint $(NetbiosRouting) == 3
  393.                set NetbiosRouting = 2
  394.             endif
  395.             ifstr(i) $(KeyParam) != $(KeyNull)
  396.                 SetRegValue $(KeyParam) {NetbiosRouting, $(NoTitle), $(!REG_VT_DWORD), $(NetbiosRouting)}
  397.                 CloseRegKey $(KeyParam)
  398.                 set CommonStatus = STATUS_SUCCESSFUL
  399.             endif
  400.         endif
  401.     endif
  402.     goto end
  403. bindingadapter =+
  404.     goto end
  405. removeadapter = +
  406.     set NwlnkRipKeyName = "System\CurrentControlSet\Services\NwlnkRip"
  407.     set ProductNWLNKRIPName  = "NwlnkRip"
  408.     Shell "" RemoveNWLNKRIPUsed $(InstallFrom)
  409.     OpenRegKey $(!REG_H_LOCAL) "" $(NwlnkRipKeyName) $(MAXIMUM_ALLOWED) BS_KeyServices
  410.     Ifstr $(BS_KeyServices) != $(KeyNull)
  411.         CloseRegKey $(BS_KeyServices)
  412.         Shell "" NumOfUsed
  413.         set NumOfUsed = $($R0)
  414.         ifint $(NumOfUsed) == 1
  415.             Shell "" FindUsed "RAS"
  416.             set RasUsing = $($R0)
  417.             ifstr(i) $(RasUsing) == TRUE
  418.                 Shell "oemnsvra.inf" CheckRasInstalled
  419.                 set RasInstalled = $($R0)
  420.                 ifstr(i) $(RasInstalled) == FALSE
  421.                     Debug-Output "OEMNSVRR.INF: The only consumer RAS is not installed, so removing NWLNKRIP service"
  422.                     set NumOfUsed = 0
  423.                 endif
  424.             endif
  425.             Shell "" FindUsed "NWLNKRIP"
  426.             ifstr(i) $($R0) == TRUE
  427.                 set NumOfUsed = 0
  428.             endif
  429.         endif
  430.         ifint $(NumOfUsed) == 0
  431.             Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $(ProductNWLNKRIPName)
  432.             OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\NwLnkIpx\Parameters" $(MAXIMUM_ALLOWED) KeyIpx
  433.             IfStr(i) $(KeyIpx) != ""
  434.                 GetRegValue $(KeyIpx), "RipTableSize", RipTableInfo
  435.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  436.                    set RipTableSizeValue = *($(RipTableInfo), 4)
  437.                    ifint $(RipTableSizeValue) == 255
  438.                        DeleteRegValue $(KeyIpx) "RipTableSize"
  439.                    endif
  440.                 endif
  441.                 CloseRegKey $(KeyIpx)
  442.             EndIf
  443.         else
  444.             ifstr(i) $(InstallFrom) == "NWLNKRIP"
  445.                 read-syms InUse$(!STF_LANGUAGE)
  446.                 set from = end
  447.                 set to = end
  448.                 goto warning
  449.             endif
  450.         endif
  451.     endif
  452.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductSAPKeyName) $(MAXIMUM_ALLOWED) SAPKeyProduct
  453.     ifstr(i) $(SAPKeyProduct) != ""
  454.         set OldInstallMode = $(!NTN_InstallMode)
  455.         set !NTN_InstallMode = deinstall
  456.         Shell "oemnsvsa.inf" InstallOption $(!STF_LANGUAGE) "SAP"  +
  457.             $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "NWLNKRIP"
  458.         set !NTN_InstallMode = $(OldInstallMode)
  459.     endif
  460.     goto end
  461. UpgradeSoftware = +
  462.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  463.     Ifstr(i) $(KeyProduct) != $(KeyNull)
  464.         install "Install-Update"
  465.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  466.             goto fatal
  467.         endif
  468.         OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\NwLnkIpx\Parameters" $(MAXIMUM_ALLOWED) KeyIpx
  469.         IfStr(i) $(KeyIpx) != ""
  470.             GetRegValue $(KeyIpx), "RipTableSize", RipTableInfo
  471.             Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  472.                SetRegValue $(KeyIpx) {RipTableSize, $(NoTitle), $(!REG_VT_DWORD), 255}
  473.             endif
  474.             CloseRegKey $(KeyIpx)
  475.         EndIf
  476.         SetRegValue $(KeyProduct) {SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)}
  477.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  478.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  479.         SetRegValue $(KeyProduct) {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductNWLNKRIPDescription)}
  480.         SetRegValue $(KeyProduct) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  481.         CloseRegKey $(KeyProduct)
  482.     endif
  483.     goto end
  484. successful = +
  485.     goto end
  486. infomsg =+
  487.    read-syms InfoDlg
  488.    ui start "Warning"
  489.    set CommonStatus = STATUS_USERCANCEL
  490.    goto end
  491. warning = +
  492.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(Error)
  493.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  494.         goto ShellCodeError
  495.     endif
  496.     ifstr(i) $($R1) == "OK"
  497.         goto $(to)
  498.     else-ifstr(i) $($R1) == "CANCEL"
  499.         goto $(from)
  500.     else
  501.         goto "end"
  502.     endif
  503. nonfatalinfo = +
  504.     Set CommonStatus = STATUS_USERCANCEL
  505.     Set Severity = STATUS
  506.     goto nonfatalmsg
  507. nonfatal = +
  508.     Set Severity = NONFATAL
  509.     goto nonfatalmsg
  510. nonfatalmsg = +
  511.     ifstr(i) $(Error) == ""
  512.         Set Severity = NONFATAL
  513.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  514.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  515.             goto ShellCodeError
  516.         endif
  517.         set Error = $($R0)
  518.     endif
  519.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  520.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  521.         goto ShellCodeError
  522.     endif
  523.     ifstr(i) $($R1) == "OK"
  524.         goto $(from)
  525.     else
  526.         goto "end"
  527.     endif
  528. fatalregistry = +
  529.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  530.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  531.         goto ShellCodeError
  532.     endif
  533.     set Error = $($R0)
  534.     goto fatal
  535. fatal = +
  536.     ifstr(i) $(Error) == ""
  537.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  538.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  539.             goto ShellCodeError
  540.         endif
  541.         set Error = $($R0)
  542.     endif
  543.     Ifint $(BillboardVisible) != 0
  544.         Shell "subroutn.inf" PopBillboard
  545.         Set BillboardVisible = 0
  546.     Endif
  547.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  548.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  549.         goto ShellCodeError
  550.     endif
  551.    goto setfailed
  552. ShellCodeError = +
  553.     set DlgType      = "MessageBox"
  554.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  555.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  556.     set STF_MB_TYPE  = 1
  557.     set STF_MB_ICON  = 3
  558.     set STF_MB_DEF   = 1
  559.     ui start "Error Message"
  560.     goto setfailed
  561. setfailed = +
  562.     set CommonStatus = STATUS_FAILED
  563.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  564.         set OEM_ABANDON_ON = FALSE
  565.         goto removeadapter
  566.     endif
  567.     goto end
  568. end = +
  569.     goto term
  570. term = +
  571.     Return $(CommonStatus)
  572. [Install-Option]
  573.     set STF_VITAL = "NO"
  574.     ifstr(i) $(AddCopy) == "YES"
  575.         AddSectionFilesToCopyList Files-NWLNKRIP $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  576.     endif
  577.     ifstr(i) $(DoCopy) == "YES"
  578.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  579.        CopyFilesInCopyList
  580.     endif
  581.     ifstr(i) $(DoConfig) == "YES"
  582.     endif
  583.     Exit
  584. [Install-Update]
  585.    set STF_VITAL        = "NO"
  586.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  587.    AddSectionFilesToCopyList Files-NWLNKRIP $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  588.    Exit
  589. [AddNWLNKRIPUsed]
  590.     read-syms GeneralConstants
  591.     read-syms FileConstants
  592.     read-syms FileConstants$(!STF_LANGUAGE)
  593.     set KeyName = $($0)
  594.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyService
  595.     ifstr(i) $(KeyService) != ""
  596.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName)"\UseRef" $(MAXIMUM_ALLOWED) KeyUseRef
  597.         ifstr(i) $(KeyUseRef) == ""
  598.             CreateRegKey $(KeyService) {"UseRef",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyUseRef
  599.         endif
  600.         ifstr(i) $(KeyUseRef) != ""
  601.             SetRegValue $(KeyUseRef) {$(KeyName),$(NoTitle),$(!REG_VT_SZ),"1"}
  602.             CloseRegKey $(KeyUseRef)
  603.         endif
  604.         CloseRegKey $(KeyService)
  605.     else
  606.     endif
  607.     return
  608. [RemoveNWLNKRIPUsed]
  609.     read-syms GeneralConstants
  610.     read-syms FileConstants
  611.     read-syms FileConstants$(!STF_LANGUAGE)
  612.     set KeyName = $($0)
  613.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyService
  614.     ifstr(i) $(KeyService) != ""
  615.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName)"\UseRef" $(MAXIMUM_ALLOWED) KeyUseRef
  616.         ifstr(i) $(KeyUseRef) == ""
  617.             CreateRegKey $(KeyService) {"UseRef",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyUseRef
  618.         endif
  619.         ifstr(i) $(KeyUseRef) != ""
  620.             DeleteRegValue $(KeyUseRef) $(KeyName)
  621.             CloseRegKey $(KeyUseRef)
  622.         endif
  623.         CloseRegKey $(KeyService)
  624.     else
  625.     endif
  626.     return
  627. [NumOfUsed]
  628.     read-syms GeneralConstants
  629.     read-syms FileConstants
  630.     read-syms FileConstants$(!STF_LANGUAGE)
  631.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyService
  632.     ifstr(i) $(KeyService) != ""
  633.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName)"\UseRef" $(MAXIMUM_ALLOWED) KeyUseRef
  634.         ifstr(i) $(KeyUseRef) == ""
  635.             CreateRegKey $(KeyService) {"UseRef",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyUseRef
  636.         endif
  637.         ifstr(i) $(KeyUseRef) != ""
  638.             EnumRegValue $(KeyUseRef) UsageList
  639.             set Num = 0
  640.             ForListDo $(UsageList)
  641.                 set-add Num = $(Num), 1
  642.             EndForListDo
  643.             CloseRegKey $(KeyUseRef)
  644.         endif
  645.         CloseRegKey $(KeyService)
  646.     else
  647.     endif
  648.     return $(Num)
  649. [FindUsed]
  650.     read-syms GeneralConstants
  651.     read-syms FileConstants
  652.     read-syms FileConstants$(!STF_LANGUAGE)
  653.     set KeyName = $($0)
  654.     set Find = FALSE
  655.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyService
  656.     ifstr(i) $(KeyService) != ""
  657.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName)"\UseRef" $(MAXIMUM_ALLOWED) KeyUseRef
  658.         ifstr(i) $(KeyUseRef) == ""
  659.             CreateRegKey $(KeyService) {"UseRef",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyUseRef
  660.         endif
  661.         ifstr(i) $(KeyUseRef) != ""
  662.             GetRegValue $(KeyUseRef),$(KeyName), KeyInfo
  663.             ifstr(i) $(RegLastError) == $(!REG_ERROR_SUCCESS)
  664.                 set Find = TRUE
  665.             endif
  666.             CloseRegKey $(KeyUseRef)
  667.         endif
  668.         CloseRegKey $(KeyService)
  669.     else
  670.     endif
  671.     return $(Find)
  672. [Source Media Descriptions]
  673.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  674. [Signature]
  675.     FileType = MICROSOFT_FILE
  676. [GetSignature]
  677.     read-syms Signature
  678.     return $(FileType)
  679. [ProductType]
  680. STF_PRODUCT  = LanmanNT
  681. STF_PLATFORM = I386
  682. [Files-Inf]
  683. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  684. [Files-NWLNKRIP]
  685. 1,NWLNKRIP.SYS , SIZE=999
  686. [LanguagesSupported]
  687.     ENG
  688. [OptionsTextENG]
  689.     NWLNKRIP = "RIP for NwLink IPX/SPX compatible transport"
  690. [FileConstantsENG]
  691. ProCaption   = "Windows NT Setup"
  692. ProCancel    = "Cancel"
  693. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  694.                "Are you sure you want to cancel copying files?"
  695. ProCancelCap = "Network Setup Message"
  696. ProText1     = "Copying:"
  697. ProText2     = "To:"
  698. ProductNWLNKRIPTitle       = "RIP for NWLink IPX"
  699. ProductNWLNKRIPDescription = "RIP for NWLink IPX"
  700. ProductNWLNKRIPDisplayName = "RIP for NWLink IPX"
  701. [VerExistsENG]
  702.     Ver   = " version "
  703.     Text1 = " is already installed. "
  704. [InUseENG]
  705. Error = "RIP for NWLink IPX is currently in use by other network protocols. Please remove all related services first."
  706. [DialogConstantsENG]
  707. Help        = "&Help"
  708. Exit        = "Cancel"
  709. OK          = "OK"
  710. HelpContext = ""
  711. Continue    = "Continue"
  712. Cancel      = "Cancel"
  713. [EnableNetbiosRoutingDlgENG]
  714. DlgType = "MessageBox"
  715. STF_MB_TITLE = "RIP for NWLink IPX Configuration"
  716. STF_MB_TYPE  = 3
  717. STF_MB_ICON  = 2
  718. STF_MB_DEF   = 2
  719. Enabled  = "NetBIOS Broadcast Propagation (broadcast of type 20 packets) is currently enabled. "$(!LF)+
  720.            "If any Microsoft Windows clients use NwLink IPX to connect to this server, you must "+
  721.            "enable this option to allow NwLink IPX to function correctly."$(!LF)+
  722.            "Enable this option only if you understand the routing implications because it might "+
  723.            "affect your network performance."$(!LF)$(!LF)+
  724.            "Do you want to disable NetBIOS Broadcast Propagation?"
  725. Disabled = "NetBIOS Broadcast Propagation (broadcast of type 20 packets) is currently disabled. "$(!LF)+
  726.            "If any Microsoft Windows clients use NwLink IPX to connect to this server, you must "+
  727.            "enable this option to allow NwLink IPX to function correctly."$(!LF)+
  728.            "Enable this option only if you understand the routing implications because it might "+
  729.            "affect your network performance."$(!LF)$(!LF)+
  730.            "Do you want to enable NetBIOS Broadcast Propagation?"
  731. [ConfigErrorTxtENG]
  732. Error = "Could not open the NWLNKRIP\Parameters registry key."
  733.